Executable Assertions and Separate Compilation
نویسندگان
چکیده
The use of executable assertions is widely recognised as a useful programming technique for complex systems. In many cases static analysis of programs allows such assertions to be removed at compile time, thus removing the overhead of the test. The use of interprocedural analysis would often allow a larger number of such tests to be statically removed; intermodular analysis could even improve overall safety of the system. In general, however, such analysis is antithetical to separate compilation and extensible systems. In this paper we ooer a partial solution to this dilemma: We propose that preconditions become part of the interface deenition of an encapsulated object. The implementation consequences of this technique are explored.
منابع مشابه
Modular polymorphic defunctionalization
Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation for a functional programming language with parametric polymorphism. Our technique allows modules in a Haskell-like language to be separately defunctionalized and com...
متن کاملA Library-Based Approach to Translating OCL Constraints to JML Assertions for Runtime Checking
OCL is a formal notation to specify constraints on UML models that cannot otherwise be expressed by diagrammatic notations such as class diagrams. Using OCL one can document detailed design decisions and choices along with the behavior, e.g., class invariants and method pre and postconditions. However, OCL constraints cannot be directly executed and checked at runtime by an implementation, thus...
متن کاملSupporting Separate Compilation in a Defunctionalizing Compiler
Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We p...
متن کاملSeparate Compilation in a Language-Integrated Heterogeneous Environment
Heterogeneous computing platforms are becoming more common in recent years. Effective programming languages and tools will play a key role in unlocking the performance potential of these systems. In this paper, we present the design and implementation of separate compilation and linking support for the CUDA programming platform. CUDA provides a language-integrated environment for writing parall...
متن کامل- - - - an Application - Oriented Approach to Distributed Error - Detecting Branch & Bound †
An important aspect which is often overlooked in software design of distributed environments is that of fault tolerance. Many methodologies in the past have attempted to provide fault tolerance efficiently, but have never been successful at eliminating explicit time and space redundancy. One approach is the Application-Oriented Fault Tolerance Paradigm, which provides fault tolerance by examini...
متن کامل